<!DOCTYPE html>
<!-- saved from url=(0032)http://192.168.59.55:8080/Admin/ -->
<html lang="en" class="k-webkit k-webkit97"><!--<![endif]--><!-- BEGIN HEAD -->
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

    <title>企业服务治理平台</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1" name="viewport">
    <meta name="_csrf" content="2a049f84-561c-44bf-ae25-f24fbf78b313">
    <meta name="_csrf_header" content="X-CSRF-TOKEN">
    <link href="/wedding_admin/statics/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <link href="/wedding_admin/statics/css/simple-line-icons.min.css" rel="stylesheet" type="text/css">
    <link href="/wedding_admin/statics/css/bootstrap.min.css" rel="stylesheet" type="text/css">
    <script src="/wedding_admin/statics/js/jquery.min.js"></script>
    <script src="/wedding_admin/statics/js/sockjs.js"></script>
    <script src="/wedding_admin/statics/js/watermark.js"></script>

    <link href="/wedding_admin/statics/css/components.css" rel="stylesheet" id="style_components" type="text/css">
    <link href="/wedding_admin/statics/css/plugins.css" rel="stylesheet" type="text/css">
    <script src="/wedding_admin/statics/js/bootstrap/bootstrap.min.js" type="text/javascript"></script>
    <link href="/wedding_admin/statics/css/toastr.min.css" rel="stylesheet" type="text/css">
    <link href="/wedding_admin/statics/css/layout.css" rel="stylesheet" type="text/css">
    <link href="/wedding_admin/statics/css/default.css" rel="stylesheet" type="text/css" id="style_color">
    <link href="/wedding_admin/statics/css/custom.css" rel="stylesheet" type="text/css">

    <style>
        .nav > li > a:focus, .nav > li > a:hover {
            background-color: inherit !important;
        }

        .nav > li > a:focus, .nav > li > a:hover {
            background-color: inherit !important;
        }

        #mainTab .k-tabstrip-items li {
            position: relative;
            display: inline-block;
            cursor: pointer;
            height: auto !important;
            min-width: 70px;
            text-align: center;
        }

        #mainTab .k-tabstrip-items li span.k-link {
            background: 0 0 !important;
            border: 0;
            margin: 0;
            color: #678098;
            display: block;
            padding: 10px 20px;
        }

        #mainTab .k-tabstrip-items li:hover {
            background-color: #f2f6f9;
            border-top: 3px solid #f2f6f9 !important;
        }

        #mainTab .k-tabstrip-items li:hover span.k-link {
            color: #5b9bd1;
        }

        #mainTab .k-tabstrip-items li.k-state-active {
            background: 0 0;
            margin: 0;
            position: relative;
            background-color: #e9ecf3;
            cursor: default;
            border-top: 3px solid #5C9ACF !important;
            border-bottom-color: transparent;
            height: auto !important;
        }

        #mainTab .k-tabstrip-items li.k-state-active span.k-link {
            color: #5b9bd1;
            display: block;
            padding: 10px 20px;
        }

        #mainTab .k-tabstrip-items {
            width: 100%;
            /*  border-bottom: 1px solid #ddd;*/
            margin: 0px !important;
            background-color: #fff;
            list-style-type: none;
            position: relative;
            /* vertical-align: top;*/
            white-space: nowrap;
            padding: 0px;
            overflow: hidden;
        }

        #tabstrip-parent, #tabstrip {
            height: 100%;
            margin: 0;
            padding: 0;
            border-width: 0;
        }

        #mainTab > .k-content {
            margin: 0;
            padding: 0;
            overflow: hidden;
        }

        #mainTab .k-tabstrip-items .k-state-default.k-state-hover .k-i-close {
            visibility: visible;
        }

        #mainTab .k-tabstrip-prev, #mainTab .k-tabstrip-next {
            top: 2px;
            background-color: #fff !important;
            display: inline-block !important;
        }

        #mainTab .k-i-arrow-w:hover, .k-i-arrow-e:hover {
            color: #36c6d3;
        }

        #mainTab .k-i-arrow-w {
            position: absolute;
            background-color: #fff;
            text-align: center;
        }

        #mainTab .k-i-arrow-e {
            position: absolute;
            background-color: #fff;
            text-align: center;
        }

        .k-tabstrip-wrapper .k-content iframe {
            height: 100%;
            width: 100%;
            padding: 0px;
        }

        .page-content {
            position: relative;
        }

        .tabstrip-context-menu {
            list-style-type: none;
            padding: 5px 15px;
            font-size: 14px !important;
            background: #fff;
            padding: 7px 0px;
            font-size: 12px !important;
            cursor: pointer;
            border: 1px solid #efefef;
            background-color: #fff;
        }

        .tabstrip-context-menu .k-item {
            height: 22px;
            line-height: 22px;
        }

        .tabstrip-context-menu .k-item:hover {
            background-color: #f2f6f9;
        }

        .tabstrip-context-menu .k-item .k-link {
            padding: 0px 42px 0px 25px;
        }

        .page-content-main {
            background: 0 0;
        }

        .title.point::before {
            content: " ";
            border: 3px solid red; /*设置红色*/
            border-radius: 3px; /*设置圆角*/
            position: absolute;
            z-index: 1000;
            right: 0%;
            margin-right: -5px;
            margin-top: -5px;
        }

        #search-fld {
            border: 1px solid #aeb2c4;
            background: #3b3f51;
            border-radius: 20px !important;
            height: 30px;
            color: #aeb2c4;
            width: 250px !important;
            text-indent: 30px;
            margin-top: 22px;
        }

        #search-fld:hover, #search-fld:focus {
            outline: none;
        }

        #search-fld::-webkit-input-placeholder {
            color: #aeb2c4;
        }

        #search-fld::-moz-placeholder {
            color: #aeb2c4;
        }

        #search-fld:-ms-input-placeholder {
            color: #aeb2c4;
        }

        #search-fld_listbox {
            background: #575d77;
            list-style: none;
            color: #dadce4;
            border-radius: 6px !important;
            padding: 0px
        }

        #search-fld_listbox li {
            padding: 5px 10px;
            cursor: pointer;
        }

        #search-fld_listbox li.k-state-focused, #search-fld_listbox li.k-state-hover {
            background-color: #606683;
        }

        #search-fld-list {
            border-radius: 6px !important;
            box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
        }

        #search-fld-list .slimScrollDiv {
            margin-top: 9px;
        }

        #search-fld-list .slimScrollDiv .slimScrollBar {
            border-radius: 6px !important;
        }

    </style>

</head>
<body class="page-container-bg-solid page-header-fixed page-sidebar-closed-hide-logo">
<div class="page-header navbar navbar-fixed-top">
    <div class="page-header-inner ">
        <div class="page-logo">
            <a href="http://192.168.59.55:8080/Admin/index.html">
         <!--       <img src="/wedding_admin/statics/css/logo.png" alt="logo" title="金田铜业服务治理平台" height="70" width="100%"
                     class="logo-default">-->
            </a>
            <div class="menu-toggler sidebar-toggler"></div>
        </div>
        <a href="javascript:;" class="menu-toggler responsive-toggler" data-toggle="collapse"
           data-target=".navbar-collapse"> </a>
        <div id="page-nav" class="page-actions" style="display: block;">
            <div class="btn-group">
                <button type="button" class="btn red-haze btn-sm dropdown-toggle" data-toggle="dropdown"
                        data-hover="dropdown" data-close-others="true" aria-expanded="false">
                    <span class="hidden-sm hidden-xs">页面导航 &nbsp;</span>
                    <i class="fa fa-angle-down"></i>
                </button>
                <ul class="dropdown-menu" id="tabstrip-menu" role="menu">


                </ul>
            </div>
        </div>
        <div class="page-top">
            <div class="top-menu">
                <ul class="nav navbar-nav pull-right">
                    <li class="dropdown dropdown-user dropdown-dark" style="position: relative">
                        <i style="position: absolute;left: 20px;line-height: 75px;color: #aeb2c4;"
                           class="fa fa-search"></i>
                        <span tabindex="-1" role="presentation" class="k-widget k-autocomplete k-header k-state-default"
                              style=""><input id="search-fld" type="text" name="param" placeholder="输入功能代码或功能名称"
                                              data-role="autocomplete" class="k-input" autocomplete="off" role="textbox"
                                              aria-haspopup="true" aria-disabled="false" aria-readonly="false"
                                              aria-owns="search-fld_listbox" aria-autocomplete="list"
                                              style="width: 100%;"><span unselectable="on" class="k-icon k-i-close"
                                                                         title="clear" role="button"
                                                                         tabindex="-1"></span><span
                                class="k-icon k-i-loading" style="display:none"></span></span>
                    </li>
                    <li class="dropdown dropdown-user dropdown-dark">
                        <a href="/wedding_admin/login" title="帮助页面"
                           style="height: 75px;padding: 28px 10px 18px;">
                            <i class="fa fa-television" style="color: #aeb2c4;"></i>
                            <span class="username username-hide-on-mobile" style="color: #aeb2c4;"></span>
                        </a>
                    </li>

                    <li class="dropdown dropdown-user dropdown-dark">
                        <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown"
                           data-close-others="true">
                            <span class="username username-hide-on-mobile" id="employeeName01"></span>

                        </a>
                        <ul class="dropdown-menu dropdown-menu-default">
                            <li>
                                <a href="javascript:myProfile();">
                                    <i class="icon-user"></i>
                                    用户信息 </a>
                            </li>
                            <li>
                                <a href="javascript:sysPreferences();">
                                    <i class="fa fa-cogs"></i>
                                    首选项 </a>
                            </li>
                            <li class="divider"></li>
                            <li>
                                <a href="javascript:logout();">
                                    <i class="icon-key"></i>
                                    退出 </a>
                            </li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="long" role="basic" style="padding-top: 110px">
    <div class="modal-dialog">
        <div class="modal-content" style="width: 700px; height:550px">
            <div class="modal-body">
                <div id="page-content"></div>
            </div>
        </div>
    </div>
</div>

<div id="static" class="modal fade" tabindex="-1" data-backdrop="static" data-keyboard="false">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                <h4 class="modal-title">Index.confirmBox</h4>
            </div>
            <div class="modal-body">
                <p> Index.confirmBox</p>
            </div>
            <div class="modal-footer">
                <button type="button" data-dismiss="modal" class="btn dark btn-outline">Cancel</button>
                <button type="button" data-dismiss="modal" class="btn green">Continue Task</button>
            </div>
        </div>
    </div>
</div>

<div class="clearfix"></div>
<div class="page-container">
    <div class="page-sidebar-wrapper">
        <div class="page-sidebar navbar-collapse collapse" id="app">
            <ul id="page-sidebar-menu" class="page-sidebar-menu" data-keep-expanded="false" data-auto-scroll="false"
                data-slide-speed="200">

            </ul>
        </div>
    </div>

    <div class="page-content-wrapper">
        <div class="page-content" style="min-height:481px">
            <div class="page-head" style="display: block;">
                <div class="page-title" style="display: inline-block">
                    <h1 id="page-title">服务实例</h1>
                </div>
                <div class="page-toolbar">
                    <div class="btn-group pull-right">
                        <button type="button" data-close-others="true"
                                class="btn green btn-sm btn-outline dropdown-toggle" data-toggle="dropdown">
                            操作 <i class="fa fa-angle-down"></i>
                        </button>
                        <ul class="dropdown-menu pull-right" id="page-button" role="menu" style="min-width: 135px">

                        </ul>
                    </div>
                </div>
            </div>
            <div class="page-content-main">
                <div id="page-content-loading" style="display: none;">
                    <i class="fa fa-refresh fa-spin"></i>
                    <span>加载中</span>
                </div>

                <div class="k-tabstrip-wrapper" id="tabstrip-parent" style="">
                    <div id="mainTab" style="position: static; left: 0px; top: 0px; outline: 0px !important;"
                         data-role="tabstrip" tabindex="0"
                         class="k-widget k-header k-tabstrip k-floatwrap k-tabstrip-top" role="tablist"
                         >
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!--[if lt IE 9]>
<script src="/wedding_admin/statics/js/um/respond.min.js"></script>
<script src="/Admin/lib/assets/global/plugins/excanvas.min.js"></script>
<![endif]-->

<script src="/wedding_admin/statics/js/js.cookie.min.js" type="text/javascript"></script>
<script src="/wedding_admin/statics/js/bootstrap/bootstrap-hover-dropdown.min.js" type="text/javascript"></script>
<script src="/wedding_admin/statics/js/jquery.slimscroll.min.js" type="text/javascript"></script>
<script src="/wedding_admin/statics/js/bootstrap/bootstrap-switch.min.js" type="text/javascript"></script>
<script src="/wedding_admin/statics/js/toastr.js" type="text/javascript"></script>
<script src="/wedding_admin/statics/js/jquery.slimscroll.min.js" type="text/javascript"></script>

<script src="/wedding_admin/statics/js/app.js" type="text/javascript"></script>
<script src="/wedding_admin/statics/js/bootstrap/bootbox.min.js" type="text/javascript"></script>
<script src="/wedding_admin/statics/js/layout.min.js" type="text/javascript"></script>

<script src="/wedding_admin/statics/js/kendo/kendo.all.min.js"></script>
<script src="/wedding_admin/statics/js/kendo/kendo.culture.zh-CN.js"></script>
<script src="/wedding_admin/statics/js/kendo/kendo.messages.zh-CN.js"></script>
<!--<script src="/wedding_admin/statics/js/hotkey"></script>-->
<script src="/wedding_admin/statics/js/kendo/kendo.hap.js"></script>

<script>


    var employeeName;
    $.ajaxSettings.async = false;
    $.getJSON("/wedding_admin/sys/selectByUserName", function (allData) {
        employeeName = allData.principal.username == null ? "" : allData.principal.username;

    });
    $(document).ready(function () {
        //onload时触发水印绘制
        window.onload = function () {
            watermark({watermark_txt: employeeName });
        };
        $("#employeeName01").html(employeeName);

    /*    Hap.initWebSocket();
        Hap.onMessage("SYS_REPEAT_LOGIN", function (data, socket) {
            socket.close();
            $.ajax({
                url: "/Admin/logout",
                data: {
                    "_csrf": "2a049f84-561c-44bf-ae25-f24fbf78b313"
                },
                type: "POST"
            });
            bootbox.dialog({
                message: '当前账号正在其他位置登录,请重新登录',
                title: '提示',
                buttons: {
                    success: {
                        label: '确定',
                        className: "green",
                        callback: function () {
                            window.location.reload();
                        }
                    }
                }
            })
        });*/


    });
    var nav = '0';

    function myProfile() {
        openTab('MY_PROFILE', '用户信息', '/wedding_admin/sys/um/sys_user_info.html');
    }

    function sysPreferences() {
        openTab('SYS_PREFERENCE', '首选项', '/wedding_admin/sys/um/home.html');
    }

    function logout() {

        bootbox.dialog({
            message: '确定退出？',
            title: '提示',
            buttons: {
                success: {
                    label: '确定',
                    className: "btn-primary",
                    callback: function () {
                        $("#logoutForm").submit();
                    }
                }, cancel: {
                    className: "btn-default",
                    label: '取消'
                }
            }
        })
    }

    function refreshPage(event) {
        var tabid = $(event).data("tabid");
        $("#mainTab").data("kendoTabStrip").refreshTab(tabid);
    }

    function closePage(event) {
        var tabid = $(event).data("tabid");
        closeTab(tabid);
    }

    function closeTab(id) {
        $("#mainTab").data("kendoTabStrip").closeTab(id);
    }

    function addShortcut(functionCode) {
        $.ajax({
            url: '/Admin/sys/shortcut/submit?functionCode=' + functionCode,
            success: function (args) {
                if (args != "") {
                    bootbox.dialog({
                        message: '成功',
                        title: '提示',
                        buttons: {
                            success: {
                                label: '确定',
                                className: "green"
                            }
                        }
                    })
                }
            }
        });

    }

    function createMenu(html, datas, top) {

        for (var i = 0; i < datas.length; i++) {
            var data = datas[i];

            html.push('<li class="nav-item">');
            if (data["list"]!=null) {
                html.push('<a href="javascript:;" class="nav-link">');
                html.push('<i class="' + (data["icon"] || 'fa fa-cube') + '"></i>');
                // if(top){
                html.push('<span class="title">' + data["name"] + '</span>');
                // }else {
                //  html.push(data.text);
                //  }
                html.push('<span class="arrow"></span></a><ul class="sub-menu">');
                createMenu(html, data["list"]);
                html.push('</ul>')
            } else if (data["url"]) {
                html.push('<a class="nav-link" id="link_' + data["menuId"] + '" href="javascript:openTab(\'' + data["menuId"] + '\',\'' + data["name"] + '\', \'' + data["url"] + '\')">');
                html.push('<i class="' + (data["icon"] || '') + '"></i>');
                html.push('<span class="title">' +data["name"] + '</span>');
                html.push('</a>')
            }
            html.push('</li>')
        }
    }

    function showTabLoading(show) {
        $('#page-content-loading')[show ? 'show' : 'hide']();
        if (show) {
            $("#mainTab").css({
                'position': 'absolute',
                'left': '-10000px',
                'top': '-10000px'
            })
        } else {
            $("#mainTab").css({
                'position': 'static',
                'left': '0px',
                'top': '0px'
            })
        }
    }

    function openTab(id, title, url, closeIcon) {
        var mainTab = $("#mainTab").data("kendoTabStrip");
        $('html,body').animate({
            scrollTop: 0
        }, 'fast');
        if (nav != "Y") {
            if ($.inArray(id, mainTab.tabids) == -1) {
                this.showTabLoading(true)
            }
        }

        if (url.indexOf('?') == -1) {
            url += '?functionCode=' + id;
        } else {
            url += '&functionCode=' + id;
        }

        mainTab.append({
            text: title,
            tabid: id,
            contentIframe: url,
            closeIcon: closeIcon = closeIcon === undefined ? true : closeIcon,
            encoded: false
        });
        if (nav == "Y") {
            $('#mainTab').children(".k-state-active");
        }
    }


    function findByCode(functionCode) {
        var data = null;
        for (var i = 0; i < menuItems.length; i++) {
            if (menuItems[i].functionCode == functionCode) {
                data = menuItems[i];
                break;
            }
        }
        return data;
    }

    var isInitScroller = false;
    var isChangeWidth = false;

    function scrollerInit() {
        var e = $("#mainTab").find(".k-i-arrow-e .fa-chevron-right");
        var w = $("#mainTab").find(".k-i-arrow-w .fa-chevron-left");
        var height = $('#mainTab .k-tabstrip-items').outerHeight();
        var position = $('#mainTab .k-tabstrip-items').position();
        if (!e.length) {
            $("#mainTab").find(".k-i-arrow-e").append('<i class="fa fa-chevron-right" aria-hidden="true"></i>');
            $("#mainTab").find(".k-i-arrow-e").css({
                top: position.top || 0,
                right: position.right || 0,
                height: height + "px",
                lineHeight: height + "px",
                width: '5%'
            })
        }
        if (!w.length) {
            $("#mainTab").find(".k-i-arrow-w").append('<i class="fa fa-chevron-left" aria-hidden="true"></i>');
            var width = $('.page-content').outerWidth() - $('#mainTab').outerWidth() + 2;
            $("#mainTab").find(".k-i-arrow-w").css({
                top: position.top || 0,
                left: position.left || 0,
                lineHeight: height + "px",
                height: height + "px",
                width: '5%'
            })
        }
    }

    function initTabStripItems(obj) {
        var hasScroller = $("#mainTab").hasClass("k-tabstrip-scrollable");

        if (!isInitScroller && hasScroller) {
            scrollerInit();
            $("#mainTab .k-tabstrip-items").css("cssText", "display:inline-block;width:90% !important;margin-left:5% !important;");
            isInitScroller = true;
            isChangeWidth = false;
        }
        if (!isChangeWidth && !hasScroller) {
            $("#mainTab .k-tabstrip-items").css("cssText", "display:inline-block;width:100% !important;margin:0% !important;");
            isInitScroller = false;
            isChangeWidth = true;
        }

        if (!$(obj.item).find(".arrow.close").length) {
            $(obj.item).find(".k-icon.k-i-close").append('<span class="arrow close" style="margin: 5px 5px;position: absolute;display: none"></span>');
        }

        $("#mainTab .k-tabstrip-items li").off("mouseover").off("mouseout").on({
            "mouseover": function (e) {
                $(e.currentTarget).find(".arrow.close").css("display", "inline-block");
            },
            "mouseout": function (e) {
                $(e.currentTarget).find(".arrow.close").css("display", "none");
            }
        });
    }

    function initTabList() {
        var mainTab = $("#mainTab").data("kendoTabStrip");
        var html = [];
        $.each(mainTab.items(), function (i, v) {
            var tabid = $(v).find("span.k-link").attr("data-tabid");
            if (tabid == "home") {
                html.push('<li><a href="javascript:openTab(\'home\',\'首页\',\'/wedding_admin/sys/um/home.html\')"><span style="padding-right:20px;" ><i class="fa fa-home fa-fw"   style=" margin-right: 10px;" ></i>' + v.textContent + "</span></a></li>");
            } else {
                var data = findByCode(tabid);
                if (!data) {
                    data = {
                        icon: 'fa fa-file',
                        functionCode: tabid,
                        text: v.innerText,
                        url: ''
                    }
                }
                html.push('<li><a href="javascript:;openTab(\'' + data.functionCode + '\',\'' + data.text + '\', \'' + data.url + '\')">');
                html.push('<span style="margin-right:10px;display:block"><i  style=" margin-right: 10px;" class="' + (data.icon || '') + '"></i>' + v.textContent + '</span>')
                html.push('<span data-tabid=' + tabid + ' class="badge badge-danger close-btn">X</span></a></li>');

            }
        });
        $("#tabstrip-menu").html(html.join(''));
    }

    $('#tabstrip-menu').on("click", '.close-btn', function (event) {
        event.preventDefault();
        event.stopPropagation();
        var tabid = $(event.target).data("tabid");
        $("#mainTab").data("kendoTabStrip").closeTab(tabid);

    });

    //自动匹配查找
    var searchAutoComplete = $("#search-fld").kendoAutoComplete({

        template: '<table  border="0"> <tr><td style="padding:5px;"><span class="#=icon#"></span></td><td><strong>#= text #</strong></td></tr>    <tr><td></td><td><span style="color:rgb(158,158,158)">#= functionCode #</span></td></tr></table>',
        highlightFirst: true,
        dataTextField: "codeAndText",
        filter: "contains",
        height: 320,
        select: function (e) {
            var item = e.item;
            var idx = item[0].dataset.offsetIndex;
            var selection = this.dataItems()[idx];
            openTab(selection.functionCode, selection.text, selection.url);
        }
    }).data("kendoAutoComplete");

    $("#search-fld_listbox").addClass("scroller");
    $("#search-fld_listbox").css("height", "320px");

    //菜单
    function loadMenu() {
        $.ajax({
            type: 'GET',
            url: '/wedding_admin/sys/sysmenu/nav',
            contentType: "application/json; charset=utf-8",
            success: function (datas) {
                var html = ['<li class="nav-item start active"><a id="link_home" href="javascript:openTab(\'home1\',\'首页\', \'/wedding_admin/sys/um/home.html\');" class="nav-link"><i class="fa fa-home fa-fw"></i><span class="title">首页</span></a></li>'];

                datas = [].concat(datas.menulist);
                createMenu(html, datas, true);
                $("#page-sidebar-menu").append(html.join(''));
                menuItems = convertToLine(datas);
                searchAutoComplete.setDataSource(menuItems);
            }
        });
    }

    var menuItems = [];

    //将tree形的数据转换成线形数据
    function convertToLine(datas) {
        var arr = [];

        function build(d) {
            if (d.children) {
                $.each(d.children, function (i, r) {
                    build(r);
                });
            } else {
                //将数据转换使实现text和code双查询
                d.codeAndText = d.functionCode + d.text;
                arr.push(d);
            }
        }

        $.each(datas, function (i, r) {
            build(r);
        });

        arr.push({
            functionCode: "MY_PROFILE",
            icon: "icon-user",
            text: '用户信息',
            url: "/wedding_admin/sys/um/sys_user_info.html"
        })
        arr.push({
            functionCode: "SYS_PREFERENCE",
            icon: "icon-user",
            text: '首选项',
            url: "/Admin/sys/um/sys_preferences.html"
        })
        return arr;
    }

    function init() {
        loadMenu();
        $("#mainTab").kendoTabStrip({
            height: '100%',
            animation: false,
            closeIcon: true,
            contextMenu: true,
            refresh: function () {
                showTabLoading(true);
            },
            load: function (para) {
                var iframe = para.iframe[0];
                window.autoResizeIframe(iframe.name)
                showTabLoading(false);
            },
            activate: function (obj) {
                $('#page-title').html(obj.item.innerText);
                var id = $(obj.item).find('.k-link').data('tabid');
                var html = [];
                html.push('<li> <a href="javascript:;"  id="page-refresh-button" onclick="refreshPage(this)"><i class="icon-refresh"></i>  刷新</a> </li>');

                if (id != "home") {
                    html.push('<li> <a href="javascript:;"  id="page-addshortCut-button" onclick="addShortcut(\'' + id + '\')"><i class="fa fa-plus-square"></i>  添加快捷方式</a> </li>');
                    html.push('<li><a href="javascript:;" id="page-close-button" onclick="closePage(this)" ><i class="icon-close"></i>  退出</a></li>');
                }
                $("#page-button").html(html.join(''));
                $("#page-close-button").data("tabid", id);
                $("#page-refresh-button").data("tabid", id);
                $('#page-sidebar-menu').find('li.active').removeClass('active');
                $('#link_' + id).parents('li.nav-item').addClass('active');
                if (nav == "Y") {
                    initTabStripItems(obj);
                } else {
                    initTabList();
                }

            },
            close: function () {
                if (nav != "Y") {
                    initTabList();
                }
            }

        }).data("kendoTabStrip");
        $("#mainTab").parent().attr("id", "tabstrip-parent");
        openTab('home', '首页', '/wedding_admin/sys/um/home.html', false);
        if (nav == "Y") {
            $("#mainTab .k-tabstrip-items").css("display", "inline-block");
            $("#AShortcut").css("display", "block");
        } else {
            $(".page-content-wrapper .page-content .page-head").css("display", "block");
            $("#AShortcut").css("display", "block");
            $("#page-nav").css("display", "block");
        }

    }

    var viewHeight = $(window).height(), contentHeight = viewHeight - 159;

    function autoResizeIframe(id, height, callback) {
        setTimeout(function () {
            var iframe = $('#iframe_' + id)[0];
            if (iframe != null && iframe.contentDocument != null) {
                var subWeb = iframe.contentDocument;
                $(iframe).height(Math.max(Math.max(subWeb.body.clientHeight, contentHeight), height || 0));
            }
            if (callback) callback.call(window)
        }, 50)

    }


    function sessionExpiredLogin() {

        bootbox.dialog({
            message: '登录超时，请重新登录！',
            title: '提示',
            buttons: {
                success: {
                    label: '确定',
                    className: "green",
                    callback: function () {
                        window.location.href = "/wedding_admin/login.html"
                    }
                }
            }
        })
    }

    init();

    Hap.onMessage("SYS_BADGE", function (data, socket) {
        Hap.showBadge(data.parameter);
    })
</script>
<div class="k-list-container k-popup k-group k-reset" id="search-fld-list" data-role="popup"
     style="display: none; position: absolute;">
    <div class="k-group-header" style="display:none"></div>
    <div class="k-list-scroller" unselectable="on">
        <div class="slimScrollDiv" style="position: relative; overflow: hidden; width: auto; height: 320px;">
            <ul unselectable="on" class="k-list k-reset scroller" tabindex="-1" aria-hidden="true"
                id="search-fld_listbox" aria-live="polite" data-role="staticlist" role="listbox" data-initialized="1"
                style="height: 320px; overflow: hidden; width: auto;"></ul>
            <div class="slimScrollBar"
                 style="background: rgb(187, 187, 187); width: 7px; position: absolute; top: 0px; opacity: 0.4; display: block; border-radius: 7px; z-index: 99; right: 1px;"></div>
            <div class="slimScrollRail"
                 style="width: 7px; height: 100%; position: absolute; top: 0px; display: none; border-radius: 7px; background: rgb(234, 234, 234); opacity: 0.2; z-index: 90; right: 1px;"></div>
        </div>
    </div>
    <div class="k-nodata" style="display:none">
        <div></div>
    </div>
</div>
<ul class="tabstrip-context-menu k-widget k-reset k-header k-menu k-context-menu k-popup k-group k-menu-vertical"
    data-role="contextmenu" tabindex="0" role="menubar" style="display: none; position: absolute;">
    <li class="k-item k-state-default menu-close k-first" role="menuitem"><span class="k-link">关闭当前页</span></li>
    <li class="k-item k-state-default menu-close-others" role="menuitem"><span class="k-link">关闭其他</span></li>
    <li class="k-item k-state-default menu-close-all" role="menuitem"><span class="k-link">关闭所有</span></li>
    <li class="k-item k-state-default menu-reload k-last" role="menuitem"><span class="k-link">刷新</span></li>
</ul>
<form id="logoutForm" method="post" target="_self" action="http://localhost:9001/wedding_admin/login"
      style="display: none;">
    <input name="_csrf" value="2a049f84-561c-44bf-ae25-f24fbf78b313">
    <input type="submit">
</form>


</body>
</html>
